//package com.example.java.kafka.es9client;
//
//import co.elastic.clients.elasticsearch.core.IndexResponse;
//
//public class InsertDoc {
//    public static void main(String[] args) {
//        ConnectElasticsearch.connect(client -> {
//            User user = new User();
//            user.setName("zhangsan");
//            user.setAge(30);
//            user.setSex("男");
//            IndexResponse indexResponse = client.index(i -> i
//                    .index("user")
//                    .id("1001")
//                    .document(user)
//            );
//            System.out.println("_index: " + indexResponse.index());
//            System.out.println("_id: " + indexResponse.id());
//            System.out.println("result: " + indexResponse.result());
//        });
//    }
//}